home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
e
/
mailinglists
/
amigae.0294feb.archive
/
000023_donews!crash!m….msus.edu!platt_Tue, 8 Feb 94 07:37:01 PST.msg
< prev
next >
Wrap
Internet Message Format
|
1994-05-26
|
4KB
Received: by bkhouse.cts.com (V1.17-beta/Amiga)
id <1r4k@bkhouse.cts.com>; Tue, 8 Feb 94 07:37:01 PST
Received: from crash by donews.cts.com with uucp
(Smail3.1.28.1 #18) id m0pTeGI-0001qKC; Mon, 7 Feb 94 14:16 PST
Received: from mhd1.moorhead.msus.edu by crash.cts.com with smtp
(Smail3.1.28.1 #18) id m0pSuzm-0000O8C; Sat, 5 Feb 94 13:56 PST
Received: by mhd1.moorhead.msus.edu (5.65/DEC-Ultrix/4.3)
id AA15695; Sat, 5 Feb 1994 15:57:47 -0600
Message-Id: <9402052157.AA15695@mhd1.moorhead.msus.edu>
Date: Sat, 5 Feb 1994 15:57:47 -0600 (CST)
X-Mailer: ELM [version 2.4 PL20]
Content-Type: text
Content-Length: 2865
From: platt@mhd1.moorhead.msus.edu (Vincent Platt)
To: amigae@bkhouse.cts.com (amigae)
Subject: AppIcon.e
Yes!!! I did it. I found that in order to read the names of the objects
dropped on an AppIcon you have to reference a wbarg structure at arglist
in the appmessage structure. (Errrkkk!!) Thanks to my friends includes I
figured this out. So it wasn't a bug in E, but durn close.
Here's the completely functioning source for a 100% (not yet) usable AppIcon.
OPT OSVERSION=37
/* The following MODULE statements come from EPP. EPP came up with these
statements given the following PMODULE statements:
PMODULE 'eheaders:exec/types'
PMODULE 'eheaders:workbench/workbench'
PMODULE 'eheaders:workbench/startup'
PMODULE 'eheaders:exec/libraries'
*/
MODULE 'exec/types'
MODULE 'exec/nodes'
MODULE 'exec/lists'
MODULE 'exec/tasks'
MODULE 'graphics/gfx'
MODULE 'exec/ports'
MODULE 'exec/semaphores'
MODULE 'utility/hooks'
MODULE 'graphics/clip'
MODULE 'graphics/copper'
MODULE 'graphics/gfxnodes'
MODULE 'graphics/monitor'
MODULE 'hardware/custom'
MODULE 'graphics/view'
MODULE 'graphics/rastport'
MODULE 'graphics/layers'
MODULE 'utility/tagitem'
MODULE 'graphics/text'
MODULE 'exec/io'
MODULE 'devices/serial'
MODULE 'devices/inputevent'
MODULE 'intuition/intuition'
MODULE 'workbench/workbench'
MODULE 'dos/dos'
MODULE 'workbench/startup'
MODULE 'exec/libraries'
MODULE 'icon'
MODULE 'wb'
DEF appmsg:PTR TO appmessage
DEF args:PTR TO wbarg
DEF dropcount
DEF x
DEF dobj:PTR TO diskobject
DEF myport:PTR TO mp
DEF appcon:PTR TO appicon
PROC main()
IF (iconbase:=OpenLibrary('icon.library',37))
IF (workbenchbase:=OpenLibrary('workbench.library',37))
IF (dobj:=GetDefDiskObject(WBDISK))
dobj.type=NIL
IF (myport:=CreateMsgPort())
IF (appcon:=AddAppIconA(NIL,NIL,'TestAppIcon',myport,NIL,dobj,NIL))
dropcount:=0
WriteF('Drop files on the AppIcon.\n')
WriteF('Example exits after 3 drops.\n')
WHILE dropcount < 3
WaitPort(myport)
WHILE appmsg:=GetMsg(myport)
IF appmsg.numargs = 0
WriteF('User activated the AppIcon.\nA window here would be nice.\n')
ELSEIF appmsg.numargs>0
WriteF('User dropped \d icons on the AppIcon.\n',appmsg.numargs)
args:=appmsg.arglist
FOR x:= 1 TO appmsg.numargs
WriteF('#\d name = "\s"\n',x,args[].name++)
ENDFOR
ENDIF
ReplyMsg(appmsg)
ENDWHILE
INC dropcount
ENDWHILE
RemoveAppIcon(appcon)
WHILE appmsg:=GetMsg(myport)
ReplyMsg(appmsg)
ENDWHILE
DeleteMsgPort(myport)
FreeDiskObject(dobj)
CloseLibrary(workbenchbase)
CloseLibrary(iconbase)
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDPROC